package com.zhongkun.datahome.service.constant;

import lombok.Getter;

/**
 * @Author: lifengsheng
 * @Date: 2025/4/18 13:58
 * @Desc
 */
@Getter
public enum DataAssetsShowScopeEnum {
    NO_SHOW(0, "不展示"),
    PART_SHOW(1, "指定业主"),
    ALL_SHOW(2, "全部业主")
    ;

    private Integer scope;

    private String desc;

    DataAssetsShowScopeEnum(Integer scope, String desc) {
        this.scope = scope;
        this.desc = desc;
    }

    public boolean is(Integer scope) {
        return this.scope.equals(scope);
    }

    public static String getDesc(Integer scope) {
        for (DataAssetsShowScopeEnum scopeEnum : DataAssetsShowScopeEnum.values()) {
            if (scopeEnum.is(scope)) {
                return scopeEnum.desc;
            }
        }
        return "";
    }
}
